<ion-header>
  <ion-navbar color="primary">
    <ion-title>{{title}}</ion-title>
  </ion-navbar>
</ion-header>

<ion-content padding (ionScroll)="check()">
  <ion-item class="start">
    <ion-label>开始时间</ion-label>
    <ion-datetime displayFormat="YYYY-MM-DD HH:mm:ss" [(ngModel)]="start" cancelText="取消" doneText="确认"></ion-datetime>
  </ion-item>
  <ion-item class="end">
    <ion-label>结束时间</ion-label>
    <ion-datetime displayFormat="YYYY-MM-DD HH:mm:ss" [(ngModel)]="end" cancelText="取消" doneText="确认"></ion-datetime>
  </ion-item>
  <div class="search">
    <div (click)="search1()">搜索</div>
  </div>
  <div>
    <ion-row>
      <ion-col col-6 text-center>
        时间
      </ion-col>
      <ion-col col-3 text-center *ngFor = "let item of dataRes">
        <span>
          {{item.name}}({{item.unit}})
        </span>
      </ion-col>
    </ion-row>
  </div>

  <div class="alert" *ngIf="text!==undefined">
      <div class="text">{{text}}</div>
      <div class="button">
        <button (click)="click()">知道了</button>
      </div>
    </div>


  <ion-list class="itemList">
    <ion-item *ngFor="let item of items;let i = index" [ngStyle]="{'background-color':(i%2 ==0) ? '#fff' : '#ededed'}">
      <ion-row>
        <ion-col col-6 text-center>
          {{item.time}}
        </ion-col>
        <ion-col col-3 text-center *ngFor = "let number of item.data">
            <span>
                {{number.toFixed(3)}}
            </span>
        </ion-col>
      </ion-row>
    </ion-item>
  </ion-list>

  <ion-infinite-scroll (ionInfinite)="doInfinite($event)" threshold="100px">
    <ion-infinite-scroll-content loadingSpinner="bubbles" loadingText="正在加载更多数据...">
    </ion-infinite-scroll-content>
  </ion-infinite-scroll>



  <!-- <div class="list">
    <nz-table #rowSelectionTable [nzData]="list" [nzPageSize]="10" (nzPageIndexChange)="refreshStatus(rowSelectionTable)" (nzPageSizeChange)="refreshStatus(rowSelectionTable)">
      <thead>
        <tr>
          <th>时间</th>
          <th *ngFor = "let item of dataRes">
            {{item.name}}({{item.unit}})
          </th>
        </tr>
      </thead>
      <tbody>
        <tr *ngFor="let data of rowSelectionTable.data">
          <td>{{data.time}}</td>
          <td *ngFor="let item of data.data">
            <p>
              {{item}}
            </p>
          </td>
        </tr>
      </tbody>
    </nz-table>
  </div>
  <div class="butn" (click)="gopage($event)">
    <button>首页</button>
    <button>尾页</button>
  </div>
  <div class="alert" *ngIf="text!==undefined">
    <div class="text">{{text}}</div>
    <div class="button">
      <button (click)="click()">知道了</button>
    </div>
  </div> -->

  <div class="goTop" tapmode (click)="scrollTo()" id="top" *ngIf="top">
      <span class="TOP">↑</span>
    </div>
  

</ion-content>
